---
title: Deploy your Astro Site to Surge
description: How to deploy your Astro site to the web using Surge
sidebar:
  label: Surge
type: deploy
logo: surge
supports: ['static']
i18nReady: true
---
import { Steps } from '@astrojs/starlight/components';

You can deploy your Astro project to [Surge](https://surge.sh/), a single-command web publishing platform designed for front-end developers.

## How to deploy

<Steps>
1. Install [the Surge CLI](https://www.npmjs.com/package/surge) globally from the terminal, if you haven't already.

    ```shell
    npm install -g surge
    ```

2. Build your Astro site from your project’s root directory.

    ```shell
    npm run build
    ```

3. Deploy to Surge using the CLI.

    ```shell
    surge dist
    ```

    You can [use a custom domain with Surge](http://surge.sh/help/adding-a-custom-domain) when deploying by running `surge dist yourdomain.com`.
</Steps>
